package com.gof.example.command;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/10 10:04.
 * haiming.fei@tongdun.cn
 */
public class App {

    public static void main(String[] args) {
        Command a = new CreateCommand();
        Command b = new OpenCommand();
        Command c = new EditCommand();

        Menu menu = new Menu();
        MenuItem m1 = new MenuItem(a);
        menu.addMenuItem(m1);

        m1 = new MenuItem(b);
        menu.addMenuItem(m1);

        m1 = new MenuItem(c);
        menu.addMenuItem(m1);

        menu.displayFunctions();
    }
}
